<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    let obj = { name:'蔡徐坤',age:24,money:1000000,hobby:['唱歌','跳舞','rep'] }
    //深拷贝( 其实也只是实现了对象的第一层属性的拷贝, 本质上也是浅拷贝 )
    var obj2 = Object.assign( {} , obj )
    console.log(obj , obj2);
    obj2.hobby.push('打篮球')
    console.log(obj , obj2);

</script>